Skip to main content

Close Workbook

AutomatR.Excel.Activities.CloseWorkbook

The "Close Workbook" activity in AutomatR is part of the Excel activities package, allowing you to close an opened Excel workbook. This activity is useful for managing resources efficiently and ensuring proper cleanup after working with Excel data.

Properties

NameDescription
Misc
Display NameThe display name of the activity. A display name is automatically generated when you indicate a target.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Close Workbook" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
WorkbookSpecifies the workbook variable representing the currently active workbook that needs to be closed. If no workbook is provided, it will close the currently active workbook.

How to use:

  1. Drag and drop the "Close Workbook" activity onto the workflow.
  2. Optionally, configure the properties by specifying the workbook variable representing the workbook to be closed. If no workbook is provided, it will close the currently active workbook.
  3. Optionally, configure the delay.
  4. Execute the workflow to close the specified workbook or the currently active workbook.

Example: Consider an example where the "Close Workbook" activity is used to close the currently active workbook:

Close Workbook:
Delay: 2

In this example, the activity closes the currently active workbook with a 2-second delay, allowing time for any necessary cleanup or synchronization.